<!-- view_papers.html -->
{% extends 'base.html' %}

{% block content %}
<nav class="navbar navbar-expand-lg navbar-light bg-light">
            <a class="navbar-brand" href="{{ url_for('home') }}">查看试卷页面</a>
            <div class="collapse navbar-collapse">
                <ul class="navbar-nav ml-auto">
                    <li class="nav-item">
                        <a class="nav-link" href="{{ url_for('teacher_dashboard') }}">返回老师面板</a>
                    </li>
                </ul>
            </div>
        </nav>
<div class="container mt-5">
    <h2>试卷列表</h2>
    <a href="{{ url_for('export_paper') }}" class="btn btn-success">导出试卷</a>
    <table class="table">
        <thead>
            <tr>
                <th>试卷ID</th>
                <th>试卷名称</th>
                <th>试题ID列表</th>
            </tr>
        </thead>
        <tbody>
            {% for paper in papers %}
            <tr>
                <td>{{ paper[0] }}</td>
                <td>{{ paper[1] }}</td>
                <td>{{ paper[2] }}</td>
            </tr>
            {% endfor %}
        </tbody>
    </table>
</div>
{% endblock %}
